#ifndef CUNIT_H

#define CUNIT_H

#include "Typedef.h"
#include "Struct.h"

int const UNIT_SIZE_X = 150;
int const UNIT_SIZE_Y = 150;

int const ZPosition_Unit = 50;

int const HALF_WEIGHT_BUILDING = 128;

class CBuilding;

class CUnit
{
public :
					CUnit(void);
	virtual			~CUnit(void);

	virtual	int		GetX(void)			= 0;
	virtual	int		GetGold(void)		= 0;

	virtual bool	Hit(int _nDamage, int _nUnitType) = 0;

	virtual void	Put(void);

			int		GetState(void);
			int		GetY(void);

			bool	Act(void);
			bool	TargetDieCheck(CUnit const * const _pEnumy);

protected :
			bool	TargetCheck(void);

	int		m_nDelayMove;
	int		m_nDelayAttack;
	int		m_nAttackCount;
	int		m_nMaxAttackCount;
	int		m_nMoveSpeed;
	int		m_nFinalTime_Attack;
	int		m_nFinalTime_Move;
	int		m_nState;
	int		m_nX;
	int		m_nY;
	int		m_nHP;
	int		m_nDEF;
	int		m_nDamage;
	int		m_nSearchRange;
	int		m_nNowTime;
	int		m_nTagMove;
	int		m_nTagAttack;

	CUnit*	m_pTarget;

	CBuilding* m_pEnumyBuilding;

	ls_Unit	*m_pEnumys;

private :

	virtual	void	Move(void)			= 0;
	virtual	void	SearchEnumy(void)	= 0;
	virtual	void	Attack(void)		= 0;
	virtual void	BuildingAttack(void)= 0;

	virtual	bool	SearchBuilding(void)= 0;

};

#endif